import requests
class TokenUtil:
    @classmethod
    def get_token(cls):
        login_url = 'http://ihrm2-test.itheima.net/api/sys/login'
        login_header = {"Content-Type": "application/json"}
        login_body = {"mobile": "13800000002","password": "123456"}
        resp = requests.post(url=login_url,headers=login_header,json=login_body)
        token = resp.json().get('data')
        return token

if __name__ == '__main__':
    print(TokenUtil.get_token())